home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.19970104-19970326 / 000298_news@columbia.edu _Fri Feb 21 14:15:51 1997.msg < prev    next >
Internet Message Format  |  2020-01-01  |  2KB

  1. Return-Path: <news@columbia.edu>
  2. Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
  3.     by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id OAA00848
  4.     for <kermit.misc@watsun.cc.columbia.edu>; Fri, 21 Feb 1997 14:15:51 -0500 (EST)
  5. Received: (from news@localhost)
  6.     by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id OAA07344
  7.     for kermit.misc@watsun; Fri, 21 Feb 1997 14:15:50 -0500 (EST)
  8. Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
  9. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  10. Newsgroups: comp.protocols.kermit.misc
  11. Subject: Re: Problems with macro parameters containing spaces.
  12. Date: 21 Feb 1997 19:15:49 GMT
  13. Organization: Columbia University
  14. Lines: 38
  15. Message-ID: <5eks95$lq2$1@apakabar.cc.columbia.edu>
  16. References: <330DE341.6927@uksr.hp.com>
  17. NNTP-Posting-Host: watsun.cc.columbia.edu
  18. Xref: news.columbia.edu comp.protocols.kermit.misc:6637
  19.  
  20. In article <330DE341.6927@uksr.hp.com>, John Bigg  <jbigg@uksr.hp.com> wrote:
  21. : It appears that if I'm passing parameters to a macro and the parameters
  22. : contain spaces \%1 only contains the first word. e.g.
  23. : C-Kermit>def mymacro { return \%1 }
  24. : C-Kermit>asg \%a {This is some text}
  25. : C-Kermit>echo \fexec(mymacro,\%a)
  26. : This
  27. : I thought I could  work around this by using {{ }} around the parameter.
  28. : C-Kermit>echo \fexec(mymacro,{{\%a}})
  29. : This is some text
  30. : which is fine. But if the text contains a } then this doesn't work
  31. : either.
  32. : C-Kermit>asg \%a {This is \125 some text}
  33. : C-Kermit>echo \fexec(mymacro,{{\%a}})
  34. : This is
  35. It is indeed a shortcoming of the parameter passing mechanism that there is
  36. no good way to distinguish between literal curly braces and curly braces
  37. used for grouping.  However, if the braces appear at different "levels", as
  38. they do in your example (around \%a, and "inside" \%a), then the parser
  39. should be able to cope.  I'll have to figure out why it doesn't and come up
  40. with a fix.
  41.  
  42. : By the way, \fchecksum and \fhexify are great additions to kermit 6,
  43. : they have simplified my implementation of TAP and UCP protocols
  44. : immensely.
  45. That was the idea :-)  C-Kermit 6.0 already comes with a simple TAP script.
  46. You used this as a model?
  47.  
  48. What is UCP?
  49.  
  50. - Frank